Music Object Extension - Tracing
|
|
The Tracing extension provides an easy way to watch calls to methods of the Music Object API and is a very useful tool to have when debugging sonification code. The extension offers a set of methods that can be used to control exactly which methods of the Music Object API are to be "watched". When a method is being watched, each call to the method will be displayed in the tracing window (either the Java console or a pop-up browser window), complete with the parameter values that are being passed.
|
What's New in the Latest Version
|
There is a dedicated version history for this extension, where you will be able to find out about the new features and possible issues with the most recent version. The version history for this extension is independent of the version history for the core Music Object API.
To get the "music-object-x-tracing.js" JavaScript file that implements this extension, simply right-click on this link (click-and-hold for Mac users). Then, from the menu that pops up, select the 'Save Link As...' or 'Save Target As...' option and save the file as "music-object-x-tracing.js" into an appropriate folder of the local copy of your Web site.
In case you have problems saving the file using the above link, the "music-object-x-tracing.js" file can also be found inside the documentation's "javascript" folder, along with the "music-object.js" file.
In order to use this extension, the following JavaScript file(s) must first be sourced in...
- music-object.js (version 3.3.0 or higher)
For more information on using extensions, consult the section About Music Object Extensions.
The enableTracing instance method lets you enable or disable tracing for all methods of a Music Object instance.
|
enableTracing ( TracingEnabledBOOL ) |

- When a value of null is specified for the TracingEnabledBOOL parameter, then the boolean value true is used for this parameter.


- Tracing can be enabled for specific methods of a specific Music Object instance using the setMethodTracing instance method.
The setMethodTracing instance method lets you enable or disable tracing for the specified method of a Music Object instance.
|
setMethodTracing ( InstanceMethodNameSTR , TracingEnabledBOOL ) |

- When a value of null is specified for the TracingEnabledBOOL parameter, then the boolean value true is used for this parameter.


- Tracing can be enabled or disabled for all methods of a Music Object instance in one easy step using the enableTracing instance method.
The Music.enableTracing static method lets you enable or disable tracing for all static methods of the Music Object API.
|
Music.enableTracing ( TracingEnabledBOOL ) |

- When a value of null is specified for the TracingEnabledBOOL parameter, then the boolean value true is used for this parameter.


- Tracing can be enabled for specific static methods of the Music Object API using the Music.setMethodTracing static method.
The Music.setMethodTracing static method lets you enable or disable tracing for the specified static method of the Music Object API.
|
Music.setMethodTracing ( StaticMethodNameSTR , TracingEnabledBOOL ) |

- When a value of null is specified for the TracingEnabledBOOL parameter, then the boolean value true is used for this parameter.


- Tracing can be enabled or disabled for all static methods of the Music Object API in one easy step using the Music.enableTracing static method.
The Music.preferJavaConsole static property is A boolean variable, specifying whether or not tracing output should be sent to the Java console on browsers where this is possible.
The Music.tracingEnabled static property is a boolean variable, acting as a master switch to enable or disable all tracing.